package com.example.tests;

import org.testng.annotations.Test;
import com.example.fw.ContactObjects;
import com.example.fw.Contacts;

public class ModifyContactTest extends TestBase {
	
	@Test
	public void testModifyContact() throws Exception {
		ContactObjects fullContact = new ContactObjects()
			.setFirstname("first name edit")
			.setLastname("last name edit")
			.setAddress("address edit")
			.setHome("+7-812-999-9911")
			.setMobile("+7-812-111-1199")
			.setWork("+7-812-999-9911")
			.setEmail("email_edit@email.com")
			.setEmail2("email2_edit@email.com")
			.setBday("")
			.setBmonth("")
			.setByear("1918")
			.setGroup("[none]")
			.setAddress2("address_edit")
			.setPhone2("+7-812-111-2288");
		Contacts oldList = app.getContactHelper().getContacts();		
 		ContactObjects contactToEdit = oldList.getOneContact();
 		contactToEdit.setFullname(fullContact.fullname);
 		System.out.println("Get "+contactToEdit.id + " id contact.");
 		app.getContactHelper().modifyRandomContact(contactToEdit.id, fullContact);
 		Contacts newList = app.getContactHelper().getContacts();
//		verifyContactRemained(oldList, fullContact, newList);
	}
}